import React from 'react'
import store from '../../redux/store'
import {addAction,minusAction} from '../../redux/actions'
export default function Index() {
    const addFn = function(){
        store.dispatch(addAction(2));
        console.log(store.getState());
    }
    const minusFn = function(){
        store.dispatch(minusAction(1));
    }
  return (
    <div>
      <h1>我是coma 数量是 {store.getState().count.count}</h1>
      <button onClick={addFn}>点击加</button>
      <button onClick={minusFn}>点击减</button>
    </div>
  )
}
